<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>奇偶算法</title>
    <script>
        // 判断一个整数是偶数还是奇数，并输出判断结果？
        var num=parseFloat(window.prompt("输入数：",""));
        if(num%2==0)
        {
            alert("偶数")
        }
        else {
            alert("奇数")
        }
    </script>

</head>
<body>
</body>
</html>